<!doctype html>
<html lang="en">

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Template • TodoMVC</title>
	<link rel="stylesheet" href="node_modules/todomvc-common/base.css">
	<link rel="stylesheet" href="node_modules/todomvc-app-css/index.css">
</head>

<body>
	<section class="todoapp">
		<!-- 头部输入框 -->
		<header class="header">
			<h1>todos</h1>
			<input class="new-todo" placeholder="What needs to be done?" v-model='addTodo' @keyup.enter='addTodos'>
		</header>

		<!-- 中间的列表主体 -->
		<!-- This section should be hidden by default and shown when there are todos -->
		<section class="main">
			<input id="toggle-all" class="toggle-all" type="checkbox" v-model='allshow'>
			<label for="toggle-all">Mark all as complete</label>
			<ul class="todo-list">
				<!-- These are here just to show the structure of the list items -->
				<!-- List items should get the class `editing` when editing and `completed` when marked as completed -->
				<li :class="{completed:itme.flag,editing:itme.id==now}" v-for='itme in btnall' :key='itme.id'>
					<div class="view">
						<input class="toggle" type="checkbox" v-model='itme.flag' @change='change(itme.id,itme.flag)'>
						<label @dblclick='dblclick(itme.id)'>{{itme.name}}</label>
						<button class="destroy" @click='delTodo(itme.id)'></button>
					</div>
					<input class="edit" value="Create a TodoMVC template" v-model='itme.name'
						@keyup.enter='amendName(itme.id,$event)'>
				</li>
			</ul>
		</section>

		<!-- 底部 -->
		<!-- This footer should hidden by default and shown when there are todos -->
		<footer class="footer">
			<!-- This should be `0 items left` by default -->
			<span class="todo-count"><strong>{{activeAdd}}</strong> item left</span>
			<!-- Remove this if you don't implement routing -->
			<ul class="filters">
				<li>
					<a :class="{selected:select=='all'}" @click='btn("all")' href="#/">All</a>
				</li>
				<li>
					<a :class="{selected:select=='active'}" @click='btn("active")' href="#/active">Active</a>
				</li>
				<li>
					<a :class="{selected:select=='complete'}" @click='btn("complete")' href="#/completed">Completed</a>
				</li>
			</ul>
			<!-- Hidden if no completed items are left ↓ -->
			<button class="clear-completed" @click='addCompleted'>Clear completed</button>
		</footer>
	</section>

	<script src="./node_modules/vue/dist/vue.js"></script>
	<script src="./node_modules/axios/dist/axios.js"></script>
	<script src="js/app.js"></script>
</body>

</html>